<div class="nav-sub w1180">
	<ul class="zoom">
		<li><a class="on">新增地址</a></li>
		<li><a href="/crm/org/list">商户列表</a></li>
<!-- 		<li><a class="on" href="/crm/org/catelog-list">商户类型</a></li> -->
<!-- 		<li><a href="/crm/org/cate-list">商户类目</a></li> -->
	</ul>
</div>
<div class="main-ct w1180">
	<a href="javascript:history.go(-1);" class="btn-cs btn-blue btn-fillet mt10">返 回</a>
<form id="commonForm" method="post" action="/crm/org/insert-address">
	<div class="form-info mt20">
	
		<dl>
			<dt>商户名称：</dt>
			<dd>
				<input type="text" class="txt" value="<?php echo $this->org['org_name'];?>" readonly="readonly">
			</dd>
		</dl>
		<dl>
			<dt>地址分类：</dt>
			<dd>
				<select name="parent_id">
				
				<option value="0">请选择顶级分类</option>
					<?php if ($this->cat_select):?>
                    <?php foreach ($this->cat_select as $v) : ?>
                        
                        <option value="<?php echo $v['id']; ?>">&nbsp;&nbsp;<?php echo $v['title']; ?></option>

                            <?php foreach ($v['child'] as $v) : ?>
                            
                            <option value="<?php echo $v['id']; ?>">&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $v['title']; ?></option>

                                
                                <?php foreach ($v['child'] as $v) : ?>
                            
                                <option value="<?php echo $v['id']; ?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $v['title']; ?></option>

                                <?php endforeach; ?>
                                
                            
                            <?php endforeach; ?> 

                     <?php endforeach; ?>  
                     <?php endif;?>	
    			</select>
			</dd>
		</dl>
		<dl>
			<dt>地址名称：</dt>
			<dd>
				<input type="text" class="txt" name="title">
			</dd>
		</dl>

	</div>
	<p class="mt30 txt-center">
		<input type="hidden" name="org_id" value="<?php echo $this->org['org_id'];?>">
		<input class="input-cs btn-fillet btn-green" type="submit" value="确定" />
		<input class="input-cs btn-fillet mr20" type="reset" value="取消" />
	</p>
</form>
</div>

<script type="text/javascript">

    $().ready(function() {
    	$("#commonForm").validate({
    		debug:true,
    		rules: {
    			org_id: {
    				required: true,
    			},
    			parent_id: {
    				required: true,
    			},
    			title: {
    				required: true,
    			},
    	
    		},
    		submitHandler:function(form){ 
    	            form.submit();
    	    }   
    	});
    
    });
</script>